HipSpriteBatch

The spritebatch contains 2 shaders. One shader is entirely internal, which you don't have any control, this is for actually being able to draw stuff on the screen.

The another one is a post processing shader, which the spritebatch doesn't uses by default. If setPostProcessingShader()

Constructors

this
this(HipOrthoCamera camera, index_t maxQuads)
Undocumented in source.

Members

Functions

addQuad
void addQuad(void[] quad, int slot)

Sets the texture slot/index for the current quad and points it to the next quad

addQuads
void addQuads(void[] quadsVertices, int slot)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(IHipTexture t, ubyte[] vertices)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(IHipTexture texture, int x, int y, int z, HipColor color, float scaleX, float scaleY, float rotation)
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(IHipTextureRegion reg, int x, int y, int z, HipColor color, float scaleX, float scaleY, float rotation)
Undocumented in source. Be warned that the author may not have intended to support it.
flush
void flush()
Undocumented in source. Be warned that the author may not have intended to support it.
setCurrentDepth
void setCurrentDepth(float depth)
Undocumented in source. Be warned that the author may not have intended to support it.
setShader
void setShader(Shader s)
Undocumented in source. Be warned that the author may not have intended to support it.
setTexture
int setTexture(IHipTexture texture)

Sets the current texture in use on the sprite batch and returns its slot.

setTexture
int setTexture(IHipTextureRegion reg)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

getTextureRegionVertices
void getTextureRegionVertices(HipSpriteVertex[] output, int slot, IHipTextureRegion reg, int x, int y, float z, HipColor color, float scaleX, float scaleY, float rotation)
Undocumented in source. Be warned that the author may not have intended to support it.
getTextureVertices
void getTextureVertices(HipSpriteVertex[] output, int slot, IHipTexture texture, int x, int y, float z, HipColor color, float scaleX, float scaleY, float rotation)
Undocumented in source. Be warned that the author may not have intended to support it.
isZeroAlpha
bool isZeroAlpha(void[] vertices)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

camera
HipOrthoCamera camera;
Undocumented in source.
currentTextures
IHipTexture[] currentTextures;
Undocumented in source.
fb
HipFrameBuffer fb;
Undocumented in source.
fbTexRegion
HipTextureRegion fbTexRegion;
Undocumented in source.
hasInitTextureSlots
bool hasInitTextureSlots;
Undocumented in source.
indices
index_t[] indices;
Undocumented in source.
lastDrawQuadsCount
uint lastDrawQuadsCount;
Undocumented in source.
managedDepth
float managedDepth;
Undocumented in source.
maxQuads
index_t maxQuads;
Undocumented in source.
mesh
Mesh mesh;
Undocumented in source.
ppShader
Shader ppShader;

Post Processing Shader

quadsCount
uint quadsCount;
Undocumented in source.
spriteBatchShader
Shader spriteBatchShader;
Undocumented in source.
usingTexturesCount
int usingTexturesCount;
Undocumented in source.
vertices
HipSpriteVertex[] vertices;
Undocumented in source.

Meta